package com.telit.dispose.dao.resourceManagement;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.telit.dispose.entity.resourceManagement.Dict;
import com.telit.dispose.entity.resourceManagement.FireConfigImg;
import com.telit.dispose.vo.resourceManagement.DictVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * Create by Chencf 2022/09/05
 */
public interface DictMapper extends BaseMapper<Dict> {


    List<DictVO> listByParentCode(@Param("code") String code);

    void insertSelective(Dict dict);



    /**
     * 根据字典分类id，获取字典列表
     */
//    @Select("select * from fire_config_name_code where parent_id = #{parentId} order by sort asc ")
//    @ResultMap("com.telit.dao.resourceManagement.DictMapper.BaseResultMap")
    List<Dict> findByParentId(Integer parentId);


    /**
     * 根据父级id 和 字典编码 查询数据
     */
    Dict simpleGetByPidAndCode(@Param("parentId") Long parentId, @Param("configCode") String configCode);


    DictVO findDictInfoByCode(@Param("parentCode") String parentCode, @Param("childCode") String childCode);

}
